<?php

/**
 * IndexController - The default controller class
 * 
 * @author
 * @version 
 */

require_once 'Zend/Controller/Action.php';

class Admin_LanguageController extends Zend_Controller_Action 
{
	public function indexAction() 
    {
        $this->render();
    }

    public function enAction() {
        $namespace = Zend::initConfig('Session')->namespace->locale;
        $locale = Zend::initConfig('Locale')->en;
        Zend::initSession($namespace)->locale = $locale;
        $this->_redirect('/admin');
    }

    public function zhAction() {
        $namespace = Zend::initConfig('Session')->namespace->locale;
        $locale = Zend::initConfig('Locale')->zh;
        Zend::initSession($namespace)->locale = $locale;
        $this->_redirect('/admin');
    }
}